import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../base/base_stateful_page.dart';

class FutureProviderPage extends BasePage {
  const FutureProviderPage({super.key});

  @override
  BasePageState<BasePage> getState() => _FutureProviderPageState();
}

class _FutureProviderPageState extends BasePageState<FutureProviderPage> {
  @override
  void initState() {
    super.initState();
    super.pageTitle = 'FutureProvider案例';
  }

  @override
  Widget buildPage(BuildContext context) {
    return Consumer<String>(builder: (context, str, widget) {
      return Center(
        child: Text(
          str,
          style: const TextStyle(fontSize: 18),
        ),
      );
    });
  }
}
